<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	pageContext.setAttribute("ctx", request.getContextPath());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>博客后台管理</title>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8">
		<link href="${ctx}/admin/images/style.css" type="text/css"
			rel="stylesheet">
	</head>
	<script src="${ctx}/js/md5.js"></script>
	<script>
		function securePwd() {
			document.forms[0].oldPassword.value=hex_md5("WwW.vken.CoM_" + document.forms[0].oldPassword.value);
			document.forms[0].newPassword.value=hex_md5("WwW.vken.CoM_" + document.forms[0].newPassword.value);
			document.forms[0].reNewPassword.value=hex_md5("WwW.vken.CoM_" + document.forms[0].reNewPassword.value);
			return true;
		}
	</script>	
	<body>
		<div id="container">
			<div id="main">
				<h3>修改用户密码	</h3>
				<div style ="color:red;" > 
      			    ${message} 
      			    <s:fielderror />
  			    </div >				
				<s:form action="changePassword" namespace="/user" theme="simple" onSubmit="return securePwd();">					
					<table id="tab">
						<tr>
							<td>用户:</td>
							<td>${user.username}</td>
						</tr>
						<tr>
							<td>旧密码:</td>
							<td><s:password  name="oldPassword"  size="20"	maxlength="20"/></td>
						</tr>
						<tr>
							<td>新密码:</td>
							<td><s:password  name="newPassword"  size="20"	maxlength="20"/></td>
						</tr>
						<tr>
							<td>确认新密码:</td>
							<td><s:password  name="reNewPassword"  size="20" maxlength="20"/></td>
						</tr>
						<tr>
							<td colspan="2">
								<s:submit name="submit" value="提交" />
							</td>
					</table>
					</s:form>
			</div>
		</div>
		</div>
		<%@include file="/admin/footer.jsp"%>